package com.androidx.p013lv.mine.adapter;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.androidx.p013lv.base.recycler.BaseRecyclerAdapter;
import com.androidx.p013lv.base.recycler.BaseRecyclerHolder;
import com.androidx.p013lv.mine.C1207R;
import com.androidx.p013lv.mine.bean.VipCenterBean;
import com.yalantis.ucrop.util.ScreenUtils;

/* renamed from: com.androidx.lv.mine.adapter.VipCenterTicketAdapter */
public class VipCenterTicketAdapter extends BaseRecyclerAdapter<VipCenterBean.TicketsBean, Holder> {
    public void MyHolder(Holder holder, int i) {
        holder.setData((VipCenterBean.TicketsBean) getDataInPosition(i));
    }

    @Override // androidx.recyclerview.widget.RecyclerView.Adapter
    public Holder onCreateViewHolder(ViewGroup viewGroup, int i) {
        View inflate = LayoutInflater.from(viewGroup.getContext()).inflate(C1207R.C1212layout.item_vip_center_ticket, viewGroup, false);
        ViewGroup.LayoutParams layoutParams = inflate.getLayoutParams();
        double screenWidth = (double) ScreenUtils.getScreenWidth(viewGroup.getContext());
        Double.isNaN(screenWidth);
        layoutParams.width = (int) (screenWidth / 2.8d);
        double d = (double) layoutParams.width;
        Double.isNaN(d);
        layoutParams.height = (int) (d / 1.666667d);
        inflate.setLayoutParams(layoutParams);
        return new Holder(inflate);
    }

    /* access modifiers changed from: package-private */
    /* renamed from: com.androidx.lv.mine.adapter.VipCenterTicketAdapter$Holder */
    public static class Holder extends BaseRecyclerHolder {
        private ImageView item_selected_img;
        private TextView item_ticket_perice;
        private TextView item_ticket_txt;
        private RelativeLayout item_vip_card_view;

        Holder(View view) {
            super(view);
            this.item_vip_card_view = (RelativeLayout) view.findViewById(C1207R.C1210id.item_vip_card_view);
            this.item_ticket_perice = (TextView) view.findViewById(C1207R.C1210id.item_ticket_perice);
            this.item_ticket_txt = (TextView) view.findViewById(C1207R.C1210id.item_ticket_txt);
            this.item_selected_img = (ImageView) view.findViewById(C1207R.C1210id.item_selected_img);
        }

        /* access modifiers changed from: package-private */
        public void setData(VipCenterBean.TicketsBean ticketsBean) {
            TextView textView = this.item_ticket_perice;
            textView.setText(ticketsBean.getPrice() + "");
            this.item_ticket_txt.setText(ticketsBean.getTname());
            if (ticketsBean.isSelected()) {
                this.item_selected_img.setVisibility(0);
            } else {
                this.item_selected_img.setVisibility(4);
            }
        }
    }
}
